<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of sfGuardFormPasswordclass
 *
 * @author marion
 */
class sfGuardFormPassword extends sfForm
{
  public function configure()
  {
    $this->setWidgets(array(
      'ancien password'		    => new sfWidgetFormInput(array('type' => 'password')),
      'nouveau password'	    => new sfWidgetFormInput(array('type' => 'password')),
      'nouveau password (répéter)'  => new sfWidgetFormInput(array('type' => 'password')),
    ));

    $this->setValidators(array(
      'ancien password'		    => new sfValidatorString(),
      'nouveau password'	    => new sfValidatorString(),
      'nouveau password (répéter)'  => new sfValidatorString(),
    ));

    $this->validatorSchema->setPostValidator(new sfGuardValidatorPassword());

    $this->widgetSchema->setNameFormat('password[%s]');
  }
}
